package com.qf.controller;/*
 *保护你的大熊
 *2021/11/17
 *21:50
 */

import org.springframework.web.bind.annotation.CrossOrigin;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

@RestController
@RequestMapping("/origin")
@CrossOrigin("http://localhost:8080") //允许来自8080服务器发来的请求
public class OriginController {

    /**
     * 模拟跨域访问
     * @return
     */
    @RequestMapping("/test1")
    public String test1(){
        return "success";
    }
}
